package com.sq.partner.manager.dao;

import java.util.List;

import com.sq.partner.manager.mybatis.model.GatewayApp;
import com.sq.partner.manager.mybatis.model.TreeDto;
import com.sq.partner.manager.util.Page;

/**
 * 
 * @author Kang Zhiqiang 
 *
 */
public interface IGatewayAppDao extends BaseDao{

	/**
	 * 查询所有app
	 * @return
	 * @throws Exception
	 */
	public List<GatewayApp> queryList() throws Exception;
	
	/**
	 * 添加
	 * @param app
	 * @throws Exception 
	 */
	public void save(GatewayApp app) throws Exception;
	
	/**
	 * 更新
	 * @param app
	 * @throws Exception 
	 */
	public void update(GatewayApp app) throws Exception;

	/**
	 * 查询app
	 * @param app
	 * @return
	 * @throws Exception
	 */
	public List<GatewayApp> queryList(GatewayApp app) throws Exception;
	
	/**
	 * 根据appName分页查询app
	 * @param page
	 * @param appName
	 * @return
	 * @throws Exception 
	 */
	public Page queryPage(Page page, String appName) throws Exception;
	
	/**
	 * 根据appId删除app
	 * @param appId
	 * @throws Exception
	 */
	public void delByAppId(String appId) throws Exception;
	
	/**
	 * 根据app属性查询app
	 * @param app
	 * @return
	 * @throws Exception
	 */
	public GatewayApp queryByApp(GatewayApp app) throws Exception;
	
	/**
	 * 将appName更新为传入的值
	 * @param app
	 * @throws Exception
	 */
	public void updateAppName(GatewayApp app) throws Exception;
	
	public List<TreeDto> querySubChannelTreeByParentChannelCode(String parentChannelCode) throws Exception;
	
	public List<GatewayApp> loadApplicationData() throws Exception;
}
